<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <link rel="stylesheet" href="/lib/layui/css/layui.css"/>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">

    <div th:include="admin/header :: header"></div>
    <div th:include="admin/left :: left"></div>
    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">
            <button class="layui-btn layui-btn-normal layui-btn-sm">百搭按钮</button>
            <hr class="layui-bg-green"/>
            <div class="layui-progress">
                <div class="layui-progress-bar" lay-percent="10%"></div>
            </div>
            <hr class="layui-bg-green"/>
            <button type="button" class="layui-btn" id="upload-btn">
                <i class="layui-icon">&#xe67c;</i>上传图片
            </button>
        </div>
    </div>

    <div th:include="admin/footer :: footer"></div>

</div>
<script type="text/javascript" src="/lib/layui/layui.all.js"></script>
<script type="text/javascript">
    layui.use('element', function () {
        var element = layui.element;
    });
    layui.use('upload', function () {
        var upload = layui.upload;

        // 执行实例
        var uploadInst = upload.render({
            elem: '#upload-btn',
            url: '/file/upload',
            done: function (res) {
                console.log(res);
            }
        });
    });
</script>
</body>
</html>